package test3;

import java.util.Date;


public class demo3 {
	public static void main(String[] args) {
		Date date1 = new Date();
		System.out.println(date1.toString());
		System.out.println(date1.toLocaleString());

		Date date2 = new Date(date1.getTime() - 60 * 60 * 24 * 1000);
		System.out.println(date2.toLocaleString());

		boolean b1 = date2.after(date1);
		boolean b2 = date1.after(date2);
		System.out.println(b1);
		System.out.println(b2);

		int d = date1.compareTo(date2);
		System.out.println(d);

		boolean c = date1.equals(date2);
		System.out.println(c);
	}
}
